export function configForm () {
  return  [
    {
      fieldName: '编码',
      field: 'code',
      value: '',
      type: 'input',
      placeholder: '请输入内容'
    },
    {
      fieldName: '业务主题域',
      field: 'dataSubject',
      value: '',
      type: 'input',
      placeholder: '请输入内容'
    },
    // {
    //   fieldName: '关联数据项名称',
    //   field: 'dataItemName',
    //   value: '',
    //   type: 'input',
    //   placeholder: '请输入内容'
    // },
    {
      fieldName: '关联功能模块',
      field: 'functionModules',
      value: '',
      type: 'input',
      placeholder: '请输入内容'
    },
    {
      fieldName: '业务单元',
      field: 'profitCenterList',
      value: [],
      type: 'select',
      placeholder: '请选择业务单元',
      optionList: this.crsrm_purchaser_sbu,
      isMul:true
    },
    {
      fieldName: '规则状态',
      field: 'stateList',
      value: [],
      type: 'select',
      placeholder: '请选择规则状态',
      optionList: this.crsrm_default_state,
      isMul:true
    },
    /*{
      fieldName: '流程状态',
      field: 'bpmnStateList',
      value: [],
      type: 'select',
      placeholder: '请选择流程状态',
      optionList: this.crsrm_rule_bpmn_state,
      disabled: true,
      isMul:true
    },*/
  
  ]
}

export function generateLists() {
  return [
    {
      type: "selection",
      width: 45,
      align: "center",
      fixed: "left"
    },
    {
      title: '编码', 
      key: "code",
      width: 165,
      resizable:true
    },
    {
      title: '标题', //
      key: "title",
      width: 125,
      resizable:true
    },
    {
      title: '业务主题域', 
      key: "dataSubject",
      width: 125,
      resizable:true
    },
    {
      title: '关联功能模块',
      key: 'dataItemName',
      width: 125,
      resizable:true
    },
    {
      title: '描述',
      key: 'describes',
      width: 125,
      resizable:true
    },
    {
      title: '业务单元',
      key: 'profitCenterStr',
      width: 125,
      resizable:true
    },
    
    {
      title: '规则状态',
      width: 125,
      resizable:true,
      key: 'state',
      render: (h, { row }) => {
        return this.stateHandle(h, row)
      }
    },
    {
      title: '流程状态',
      width: 180,
      resizable:true,
      key: 'bpmnState',
      render: (h, { row }) => {
        return this.bpmn_stateHandle(h, row)
      }
    },
    {
      title: '创建人',
      key: 'createUserName',
      // width: 125,
      // resizable:true
    },
    {
        title: '创建时间', // 创建时间
      key: "createTime",
      width: 165,
      // resizable:true
    },
    {
      title: '变更人',
      key: 'updateUserName',
      // width: 125,
      // resizable:true
    },
    {
      title: '变更时间',
      key: 'updateTime',
      width: 165,
      // resizable:true
    },

    {
      title: '操作',
      // align: "left",
      align: "center",
      fixed: "right",
      width: 60,
      // resizable:true,
      render: (h, {row}) => {
          return h("RowTools", {
            props: {
              data: [
                {
                  type: 'icon',
                  icon: 'md-eye',
                  text: '查看',
                  // text: '详情',
                  handle: () => {
                    this.detailHandle(row);
                  }
                },
              ]
            }
          });
        }
    }
    ]
}
export const formField = {
  code: "编号",
  state: "规则状态",
  title: "标题",
  describes: "业务规则描述",
  functionModules: "关联功能模块",
  dataItemName: "关联数据项名称",
  profitCenter: "利润中心",
  dataSubject: "业务主题域",
  systemName: "所属系统",
  bpmnState:"流程状态",
  createUserId: "创建人",
  updateUserId: "更变人",
  createTime: "创建时间",
  updateTime: "更新时间"
}
